<template>
  <div>Detail页面</div>
  <child :msg="msg" @send="send"/>
</template>

<script>
import { defineComponent, reactive, ref, toRefs } from "vue";
import { useRouter } from "vue-router";
import Child from "../components/child/Child.vue";

export default defineComponent({
  name: "Detail",
  components: {
    Child,
  },
  setup() {
    let router = ref(useRouter());

    let msg = ref("这是父组件的数据1000")
    let send = (val)=>{
        console.log("data from child:"+val)
    }
    return {
      router,
      msg,
      send
    };
  },
});
</script>
